package com.cesgroup.zw.spring.boot.library.echarts.lineAndBar.complex;

import com.cesgroup.zw.spring.boot.echarts.component.series.Line;
import com.cesgroup.zw.spring.boot.echarts.enums.Symbol;
import com.cesgroup.zw.spring.boot.echarts.model.style.AreaStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.ItemStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LineStyle;

/**
 * @author ytj
 * @date 2019/7/4 13:13
 */
@SuppressWarnings("serial")
public class ComplexLineSeries extends Line {
    public ComplexLineSeries(ComplexLineAndBarParam param){
        this.setName(param.getLineName());
        this.setType("line");
        this.setYAxisIndex(1);
        this.setSmooth(true);
        this.setShowAllSymbol(true);
        this.setSymbol(Symbol.circle);
        this.setSymbolSize(10);
        this.setItemStyle(new ItemStyle(){{
            this.setColor("#058cff");
        }});
        this.setLineStyle(new LineStyle(){{
            this.setColor("#058cff");
        }});
        this.setAreaStyle(new AreaStyle(){{
            this.setColor("rgba(5,140,255, 0.2)");
        }});
        this.setData((Object[]) param.getDataset().get("value"));
    }
}
